
<head>
<center>
<LINK REL="StyleSheet" HREF="style.css" TYPE="text/css">

<body background=x1.gif leftmargin=1 topmargin=1 marginwidth=1 marginheight=1>
			<div >
<?PHP include("config.php"); ?>
</head>

<?php
$query = "select strength,vitality,dexterity,energy,clevel,reset,pklevel,pkcount,mapnumber,mapposx,mapposy,class,money,ctlcode,accountid,leveluppoint,pontos from Character WHERE Name='$name'";
$result = mssql_query( $query );
$character = mssql_fetch_row($result);
$str = $character[0];
$vit = $character[1];
$dex = $character[2];
$en = $character[3];
$lvl = $character[4];
$resets = $character[5];
$pklvl = $character[6];
$pknum = $character[7];
$map = $character[8];
$mapx = $character[9];
$mapy = $character[10];
$class = $character[11];
$clazz = $character[11];
$zen = $character[12];
$code = $character[13];
$acc = $character[14];
$lvlup = $character[15];
$cbr = $character[16];
$pontos = $character[17];
?>

<?php
require 'config.php';
$msconnect=mssql_connect("$dbhost","$dbuser","$dbpasswd");
$msdb=mssql_select_db("MuOnline",$msconnect);
$query = "select Vitality,Strength,Energy,Dexterity,LevelUpPoint,cLevel,Class,MapNumber,MapPosX,MapPosY,AccountID,ctlcode,money from Character WHERE Name='$name'";
$result = mssql_query( $query );
$row = mssql_fetch_row($result);
$current_ip = getenv("REMOTE_ADDR");

$reason1 = $ip_cc[1];
$gm = $ip_cc[2];
if ($ip_check == $current_ip) {
echo "$ip_check Banned: <font color=blue>$reason1</font> ,The Game Master That Blocked your Ip: <font color=blue>$gm</font> <br>"; 
die(); }
$queryxax = "select bloc_code,bloc_reason,bloc_by from MEMB_INFO WHERE memb___id='$row[10]'";


$test1 = "Select G_Name FROM GuildMember WHERE Name='$name'";
$test2 = mssql_query( $test1 );
$guild1 = mssql_fetch_row($test2);

$tezt1 = "select G_Master FROM Guild WHERE G_Name='$guild1[0]'";
$tezt2 = mssql_query( $tezt1 );
$GM = mssql_fetch_row($tezt2);

$guild = "$guild1[0]";

$acccheck = $accforbid[0];
$reason = $accforbid[1];
$bloc_by = $accforbid[2];
if ($row[6] == 0) { 
echo 'Char Não encontrado no Banco de Dados';
}
else {
$new_vit = $row[0];
$new_str = $row[1];
$new_eng = $row[2];
$new_agi = $row[3];
$levelup = $row[4];
$level = $row[5];
$mapx = $row[8];
$mapy = $row[9];
$acc = $row[10];
$code = $row[11];
$money = $row[12];

if ($row[13] > 0) {
$reason = $row[13]; }
elseif ($row[14] > 0) {
$bloc_by = $row[14]; }
$acc1 = $acc;
if ($code == '8') {
$acc = '[hidden]';
}
if ($row[7] == 0) { 
$map = 'Lorencia';
}
if ($row[7] == 1) { 
$map = 'Dungeon';
}
if ($row[7] == 2) { 
$map = 'Davias';
}
if ($row[7] == 3) { 
$map = 'Noria';
}
if ($row[7] == 4) { 
$map = 'Lost tower';
}
if ($row[7] == 5) { 
$map = 'Exile';
}
if ($row[7] == 6) { 
$map = 'Arena';
}
if ($row[7] == 7) { 
$map = 'Atlans';
}
if ($row[7] == 8) { 
$map = 'Tarkan';
}
if ($row[7] == 9) { 
$map = 'Devil Square';
}
if ($row[7] == 10) { 
$map = 'Icarus(2)';
}
if ($row[7] == 11) { 
$map = 'Blood castle 1';
}
if ($row[7] == 12) { 
$map = 'Blood castle 2';
}
if ($row[7] == 13) { 
$map = 'Blood castle 3';
}
if ($row[7] == 14) { 
$map = 'Blood castle 4';
}
if ($row[7] == 15) { 
$map = 'Blood castle 5';
}
if ($row[7] ==16) { 
$map = 'Blood castle 6';
}
if ($row[7] ==17) { 
$map = 'Blood castle 7';
}
if ($row[6] == 1) {
$class = 'Soul Master';
}
if($row[6] == 16){
$class = 'Dark Knight';
}
if($row[6] == 17){
$class = 'Blade Knight';
}
if($row[6] == 32){
$class = 'Elf';
}
if($row[6] == 33){
$class = 'Muse Elf';
}
if($row[6] == 48){
$class = 'Magic Gladiator';
}
if ($row[6] == 64) {
$class = 'Dark Lord';
}
if ($row[11] == 8) {
$code = 'Game Master';
$ccc1 = 'blue';
}
if ($row[11] == 1) {
$code = 'Banned sucker!';
$ccc1 = 'red';
}
if ($row[11] == NULL) {
$code = 'Normal User';
$ccc1 = 'green';
}
if ($acccheck == 1) {
$code = 'Account blocked!';
$ccc1 = 'darkred';
}
$querytest = "select ctlcode,bloc_reason,bloc_by,mail_addr from Character WHERE Name='$name'";

if ($testc[0] == 1) {
$reason=$testc[1];
$bloc_by=$testc[2]; }

$query = "select ConnectStat,ConnectTM,DisConnectTM,IP from MEMB_STAT WHERE memb___id='$acc1'";
$result = mssql_query( $query );
$row1 = mssql_fetch_row($result);
$ipp = $row1[3];
if ($row1[0] == 1) { 
$status = 'Online';
$ccc = 'green';
}
if ($row1[0] == 0) { 
$status = 'Offline';
$ccc = 'red';
}
$condate = $row1[1];
$discondate = $row1[2];

if ($rowZ[0] < '1') { 

}

}
?>

        




<center><table border=1 bordercolor=white width=455>
<tr>
<td colspan=3 bgcolor=white align=center>
<font face=arial size=4 color=black><b>Estatisticas do personagem solicitado:</b></font>
</td>
</tr>

<tr>
<td bgcolor=#FAFFFF rowspan=18 width=120 align=left>
    <?
		for($i=0;$i < mssql_num_rows($result);++$i)
			{
			$row = mssql_fetch_row($result);
			$rank = $i+1;
			if($character[11] == 0){ $character[11] =  'images/dw.gif';
			}
			if($character[11] == 1){ $character[11] =  'images/dw.gif';
			}
			if($character[11] == 16){ $character[11] =  'images/dk.gif';
			}
			if($character[11] == 17){ $character[11] =  'images/dk.gif';
			}
			if($character[11] == 32){ $character[11] =  'images/Elf.gif';
			}
			if($character[11] == 33){ $character[11] =  'images/Elf.gif';
			}
			if($character[11] == 48){ $character[11] =  'images/mg.gif';
			}
			if($character[11] == 64){ $character[11] =  'images/dl.gif';
			}
			echo "<img src='$character[11]' border=0>";
			}
		?>
</td>
<td bgcolor=#FAFFFF align=left></td>
</tr>
<tr>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black>Personagem</font></td>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black><?php echo $name; ?></font></td>
</tr>
<tr>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black>Último IP</font></td>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black><?php echo $ipp; ?></font></td>
</tr>
<tr>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black>Class</font></td>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black><?php echo $class; ?></font></td>
</tr>
<tr>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black>Mapa onde esta</font></td>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black><?php echo $map; ?></font></td>
</tr>
<tr>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black>Coordenada X</font></td>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black><?php echo $mapx; ?></font></td>
</tr>
<tr>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black>Coordenada Y</font></td>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black><?php echo $mapy; ?></font></td>
</tr>
<tr>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black>Level</font></td>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black><?php echo $level; ?></font></td>
</tr>
<tr>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black>Vitalidade</font></td>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black><?php echo $new_vit; ?></font></td>
</tr>
<tr>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black>Força</font></td>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black><?php echo $new_str; ?></font></td>
</tr>
<tr>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black>Energia</font></td>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black><?php echo $new_eng; ?></font></td>
</tr>
<tr>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black>Agilidade</font></td>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black><?php echo $new_agi; ?></font></td>
</tr>
<tr>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black>Pontos á Distribuir</font></td>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black><?php echo $levelup; ?></font></td>
</tr>
<tr>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black>Guild</font></td>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black><?php echo $guild; ?></font></td>
</tr>
<tr>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black>Resets</font></td>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black><?php echo $resets; ?></font></td>
</tr>
<tr>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black>Pontos de Evento</font></td>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black><?php echo $pontos; ?></font></td>
</tr>
<tr>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black>Status</font></td>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black><?php echo $status; ?></font></td>
</tr>
<tr>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black>Ultima Conexão</font></td>
<td bgcolor=#FAFFFF align=left><font face=verdana size=2 color=black><?php echo $condate; ?></font></td>
</tr>

</table>
</center>

</body>
</html>
</body></center>
</html>